package world.member.service;

import java.sql.SQLException;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import world.member.dao.MemberDAO;
import world.member.domain.Member;

@Service	//==memberServiceImpl
public class MemberServiceImpl implements MemberService {

	@Resource(name="memberDAOImpl")
	private MemberDAO dao;
	
	public MemberServiceImpl(){}
	/* setter
	public void MemberSeviceImpl(MemberDAO dao){
		this.dao = dao;
	}
	 */
	//회원가입
	@Override
	public void joinMember(Member m) throws SQLException {
		
			dao.joinMember(m);
		
	}
	
	//ID로 조회**
	@Override
	public Member memberById(String id) throws SQLException {
		Member member = dao.memberById(id);
		return member;
	}
	
	//닉네임 체크
	@Override
	public Member nickNameCheck(String nickName) throws SQLException {
		Member member = dao.nickNameCheck(nickName);
		return member;
	}
	
	//회원 정보 수정
	@Override
	public void updateMember(Member member) throws SQLException {
		dao.updateMember(member);
	}
	
	//회원탈퇴(memberLeave 변경)
	@Override
	public void updateLeave(Member member) throws SQLException {
		dao.updateLeave(member);
		
	}

	/*
	public ArrayList<Member> idCheck(String idCheck) throws SQLException {
		ArrayList<Member> list = dao.idCheck(idCheck);
		return list;
	}
	*/
	
	
	

}
